package com.kkb.test;

import com.kkb.pojo.Menu;
import com.kkb.service.RoleService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Lxy
 * @create 2022-03-20 14:47
 */

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring.xml"})
public class testRoleMenu {

    @Resource
    private RoleService roleService;

    //
    @Test
    public void testRoleMenuList(){
        List<Menu> menuListByRid = roleService.getMenuListByRid(1);
        for (Menu menu : menuListByRid) {
            System.out.println(menu);
        }
    }


    //
    @Test
    public void testRoleMenuList1(){
        List<Menu> menuListByRid1 = roleService.getMenuListByRid1(1);
        menuListByRid1.forEach(menu -> System.out.println(menu));

    }
}
